package com.luyue.zagj.fragment;

import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.FrameLayout;
import android.widget.TextView;

import com.luyue.zagj.MyApplication;
import com.luyue.zagj.R;
import com.umeng.analytics.MobclickAgent;

import butterknife.Bind;
import butterknife.ButterKnife;
import butterknife.OnClick;

/**
 * Created by luyue on 2016/11/16.
 */

public class InsuranceThreeFragment extends Fragment {


    @Bind(R.id.three_ins_num_tv)
    TextView threeInsNumTv;
    @Bind(R.id.three_ins_time_tv)
    TextView threeInsTimeTv;
    @Bind(R.id.three_ins_name_tv)
    TextView threeInsNameTv;
    @Bind(R.id.three_ins_phone_tv)
    TextView threeInsPhoneTv;
    @Bind(R.id.three_ins_idcard_tv)
    TextView threeInsIdcardTv;
    @Bind(R.id.three_ins_msg_phone_tv)
    TextView threeInsMsgPhoneTv;
    @Bind(R.id.three_ins_instructions_tv)
    TextView threeInsInstructionsTv;
    @Bind(R.id.three_ins_call)
    FrameLayout threeInsCall;
    private View view;

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.fragment_ins_three, container, false);

        ButterKnife.bind(this, view);
        initData();
        return view;
    }

    private void initData() {

    }

    @Override
    public void onDestroyView() {
        super.onDestroyView();
        ButterKnife.unbind(this);
    }

    @OnClick(R.id.three_ins_call)
    public void onClick() {
        Intent intent = new Intent(Intent.ACTION_CALL, Uri.parse("tel:" + threeInsMsgPhoneTv.getText()));
        startActivity(intent);
    }
    public void onResume() {
        super.onResume();
        MobclickAgent.onResume(MyApplication.getContext());
    }
    public void onPause() {
        super.onPause();
        MobclickAgent.onResume(MyApplication.getContext());
    }
}
